import mockRequest from '@/utils/mockRequest'
const actions = {
  async getData({ commit }) {
    let res = await mockRequest({ url: '/home/list', method: 'get' })
    console.log(res)
    if(res.code === 20000){
      commit('GETDATE',res.data)
    }
  }
}
const mutations = {
  GETDATE(state,data){
    state.list = data
  }
}
const state = {
  list:{}
}
const getters = {}
export default {
  actions,
  mutations,
  state,
  getters
}